{include file="Public/header" title="初始化系统"/}
<!-- 主容器 start -->
<div id="container" class="container-fluid">
    <div class="row-fluid">

        <!-- 左侧导航栏 start -->
        {include file="Public/sidebar"/}
        <!-- 左侧导航栏 end -->
        <style>
            .tag .select_side {
                float: left;
                width: 200px
            }

            .tag select {
                width: 180px;
                height: 120px
            }

            .tag .select_opt {
                float: left;
                width: 40px;
                height: 100%;
                margin-top: 60px
            }

            .tag .select_opt p {
                width: 26px;
                height: 26px;
                margin-top: 6px;
                background: url(images/admin/arr.gif) no-repeat;
                cursor: pointer;
                text-indent: -999em
            }

            .tag .select_opt p#toright {
                background-position: 2px 0
            }

            .tag .select_opt p#toleft {
                background-position: 2px -22px
            }

        </style>
        <!-- 主内容 start -->
        <div id="content" class="span10">
            <!-- 标题 start -->
            <div class="pageTit page-header">
                <h1>初始化系统</h1>

                <div class="opt">
                    <a class="btn btn-info" href="{:U('admin/config/base')}">返回修改配置</a>
                </div>
            </div>
            <!-- 标题 end -->
            <!-- 内容区块 start -->
            <div class="formBox">
                <div class="control-group">
                    <button type="submit" class="btn btn-primary Sub" value="初始化" id="reset_db">初始化</button>
                </div>
            </div>
            <div class="formBox">
                <div class="control-group">
                    <p id="result_p"></p>
                </div>
            </div>
            <!-- 内容区块 end -->
        </div>
    </div>
</div>
<script>
    $("#reset_db").click(function(){
        $.ajax({
            type: "post",
            url: "__APP__/admin/config/go_db",
            async: true,
            datatype: "json",
            success: function (data) {
                if(data.status==1)
                {
                    $("#result_p").val(data.data);
                }
                else
                {
                    $("#result_p").val(data.data);
                }
            },
            error:function()
            {
                $("#result_p").val("数据异常，请刷新重试")
            }
        });
    });
</script>
<!-- 脚部 end -->
<!-- 主容器 end -->
{include file="Public/footer"/}